package com.moneydance.modules.features.myposition;

import java.awt.Dimension;
import java.io.IOException;
import java.net.URL;

import javax.swing.JEditorPane;

public class MyEditorPane extends JEditorPane {

	private int myWidth = 0;
	
	public MyEditorPane() {
	}

	public MyEditorPane(int myWidth) {
		this.myWidth = myWidth;
	}
	
	public MyEditorPane(URL initialPage) throws IOException {
		super(initialPage);
	}

	public MyEditorPane(String url) throws IOException {
		super(url);
	}

	public MyEditorPane(String type, String text) {
		super(type, text);
	}

	public Dimension getPreferredSize() {
		if (myWidth == 0) return super.getPreferredSize();
		
		int height = super.getPreferredSize().height;
		
		return new Dimension(myWidth,height);
	}
	
	

}
